// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

export default class Utils{
    static GlobalMount(className, obj){
        if (!window.hasOwnProperty('vv')) {
            window.vv = {}
        }
        if (!window.vv.hasOwnProperty(className)) {
            window.vv[className] = obj
        }
    }

    static getMount(className){
        if (!window.hasOwnProperty('vv')) {
            window.vv = {}
        }

        if (!window.vv.hasOwnProperty(className)) {
            return null
        }

        return window.vv[className]
    }
}
